From: iap10@labyrinth.cl.cam.ac.uk Date: Fri, 24 Sep 2004 13:27:48 +0000 (+0000) Subject: bitkeeper revision 1.1159.88.1 (415420d4IxwW7UQx0gqyLbAniiq8XA) X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~17400^2~574^2^2 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=c505fab73b47a6e28f324f82f8088374fda1b550;p=xen.git bitkeeper revision 1.1159.88.1 (415420d4IxwW7UQx0gqyLbAniiq8XA) minor cleanup of the memory audit debug code --- diff --git a/xen/arch/x86/memory.c b/xen/arch/x86/memory.c index 84c7ade98c..e08b75e3c2 100644 --- a/xen/arch/x86/memory.c +++ b/xen/arch/x86/memory.c @@ -1870,30 +1870,32 @@ void audit_domain( struct domain *d) if ( tcount < 0 ) { + // This will only come out once printk("Audit %d: type count whent below zero pfn=%x taf=%x otaf=%x\n", d->domain, page-frame_table, page->u.inuse.type_info, page->tlbflush_timestamp); - return; } page->u.inuse.type_info = - (page->u.inuse.type_info & ~PGT_count_mask) | tcount; + (page->u.inuse.type_info & ~PGT_count_mask) | + (tcount & PGT_count_mask); } ctot++; count += dir; if ( count < 0 ) { + // This will only come out once printk("Audit %d: general count whent below zero pfn=%x taf=%x otaf=%x\n", d->domain, page-frame_table, page->u.inuse.type_info, page->tlbflush_timestamp); - return; } page->count_info = - (page->count_info & ~PGC_count_mask) | count; + (page->count_info & ~PGC_count_mask) | + (count & PGC_count_mask); } @@ -2055,11 +2057,34 @@ void audit_domain( struct domain *d) if ( (l1page->u.inuse.type_info & PGT_type_mask) != PGT_l1_page_table ) - printk("Audit %d: [%x] Expected L1 t=%x pfn=%lx\n", - d->domain, i, - l1page->u.inuse.type_info, - l1pfn); - + { + if( (l1page->u.inuse.type_info & PGT_type_mask) == + PGT_l2_page_table ) + { + if( l1pfn == pfn ) + { + printk("Audit %d: [%x] Found Self Linear PT t=%x pfn=%lx\n", + d->domain, i, + l1page->u.inuse.type_info, + l1pfn); + } + else + { + printk("Audit %d: [%x] Found Other Linear PT t=%x pfn=%lx\n", + d->domain, i, + l1page->u.inuse.type_info, + l1pfn); + } + } + else + { + printk("Audit %d: [%x] Expected L1 t=%x pfn=%lx\n", + d->domain, i, + l1page->u.inuse.type_info, + l1pfn); + } + + } adjust( l1page, -1, 1 ); } }